package com.qen.encrypt.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 加解密-签名异常类
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class EncryptException extends RuntimeException {

    private int code;
    private String msg;
    private String message;

    public EncryptException(Exception e) {
        this.msg = e.getMessage();
        this.code = 303;
        this.message = "参数错误";
    }

    public EncryptException(String message) {
        this.msg = message;
        this.code = 303;
        this.message = "参数错误";
    }

    public EncryptException(Exception e, String message) {
        this.code = 303;
        this.msg = e.getMessage();
        this.message = message;
    }

}
